package com.woniuxy.repay.service;

import com.woniuxy.entity.RepaymentManage;
import com.woniuxy.repay.entity.PageBean;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

/**
 * @author shichen
 * @create 2021-11-13-9:34
 * @description
 */
@CacheConfig(cacheNames = "repaymentManage")
public interface RepaymentManageService {

    /**
     * 根据 企业名字，
     * 企业类型（核心企业，上下游企业），
     * 还款状态 查询
     * @param repaymentManage
     * @param pageIndex
     * @return
     */
    @Cacheable(key = "'selectByCondition'+#repaymentManage+'pageIndex'+#pageIndex")
    public PageBean selectByCondition(RepaymentManage repaymentManage,Integer pageIndex);

    /**
     * 更改信息 查询后要更新缓存
     * @param repaymentManage
     */
    @CacheEvict(allEntries = true)
    public void updateByCondition(RepaymentManage repaymentManage);

    /**
     * 新增管理 条目
     * @param repaymentManage
     */
    @CacheEvict(allEntries = true)
    public void insert(RepaymentManage repaymentManage);



}
